package com.yxjwzpx.management.mapper;

import com.yxjwzpx.management.domain.FaultReport;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 故障上报Mapper接口
 * 
 * @author yxjwzpx
 * @date 2025-04-09
 */
public interface FaultReportMapper 
{
    int countThisMonthByUserId(@Param("userId") Long userId);

    List<Map<String, Object>> groupByDescriptionByUserId(@Param("userId") Long userId);


    /**
     * 查询故障上报
     * 
     * @param reportId 故障上报主键
     * @return 故障上报
     */
    public FaultReport selectFaultReportByReportId(Long reportId);

    /**
     * 查询故障上报列表
     * 
     * @param faultReport 故障上报
     * @return 故障上报集合
     */
    public List<FaultReport> selectFaultReportList(FaultReport faultReport);

    /**
     * 新增故障上报
     * 
     * @param faultReport 故障上报
     * @return 结果
     */
    public int insertFaultReport(FaultReport faultReport);

    /**
     * 修改故障上报
     * 
     * @param faultReport 故障上报
     * @return 结果
     */
    public int updateFaultReport(FaultReport faultReport);

    /**
     * 删除故障上报
     * 
     * @param reportId 故障上报主键
     * @return 结果
     */
    public int deleteFaultReportByReportId(Long reportId);

    /**
     * 批量删除故障上报
     * 
     * @param reportIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteFaultReportByReportIds(Long[] reportIds);
}
